<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>贵州7天自驾游攻略 - 2024年7月19日出发</title>
  <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=08e256c5259f80233ab53d7e7fd3acf8&plugin=AMap.Driving,AMap.Weather"></script>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
      line-height: 1.6;
      color: #333;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      min-height: 100vh;
    }

    .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px;
    }

    .header {
      text-align: center;
      margin-bottom: 40px;
      color: white;
    }

    .header h1 {
      font-size: 2.8rem;
      margin-bottom: 10px;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }

    .header p {
      font-size: 1.2rem;
      opacity: 0.9;
    }

    .weather-info {
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(10px);
      border-radius: 15px;
      padding: 20px;
      margin-bottom: 40px;
      color: white;
    }

    .weather-info h3 {
      margin-bottom: 15px;
      font-size: 1.4rem;
    }

    .weather-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 15px;
    }

    .weather-item {
      text-align: center;
      padding: 10px;
      background: rgba(255, 255, 255, 0.1);
      border-radius: 10px;
    }

    .map-container {
      background: white;
      border-radius: 20px;
      padding: 20px;
      margin-bottom: 40px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    #mapContainer {
      width: 100%;
      height: 500px;
      border-radius: 10px;
    }

    .itinerary {
      display: grid;
      gap: 30px;
    }

    .day-card {
      background: white;
      border-radius: 20px;
      padding: 30px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
      position: relative;
      overflow: hidden;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .day-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    }

    .day-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 4px;
      background: linear-gradient(90deg, #667eea, #764ba2);
    }

    .day-header {
      display: flex;
      align-items: center;
      margin-bottom: 25px;
    }

    .day-number {
      background: linear-gradient(135deg, #667eea, #764ba2);
      color: white;
      width: 60px;
      height: 60px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5rem;
      font-weight: bold;
      margin-right: 20px;
    }

    .day-title {
      font-size: 1.8rem;
      color: #333;
      font-weight: 600;
    }

    .attractions {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 20px;
      margin-bottom: 20px;
    }

    .attraction-card {
      border: 1px solid #e0e0e0;
      border-radius: 15px;
      overflow: hidden;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .attraction-card:hover {
      transform: scale(1.02);
      box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    }

    .attraction-image {
      width: 100%;
      height: 200px;
      background: linear-gradient(45deg, #667eea, #764ba2);
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 1.1rem;
      position: relative;
      background-size: cover;
      background-position: center;
      overflow: hidden;
    }

    .attraction-image::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, rgba(102, 126, 234, 0.7), rgba(118, 75, 162, 0.7));
      z-index: 1;
    }

    .attraction-image span {
      position: relative;
      z-index: 2;
      text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
      font-weight: bold;
    }

    .attraction-image::after {
      content: '📸';
      position: absolute;
      bottom: 10px;
      right: 10px;
      font-size: 1.5rem;
      z-index: 2;
    }

    /* 景点真实图片背景 */
    .image-tongzi {
      background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg width="400" height="300" xmlns="http://www.w3.org/2000/svg"%3E%3Cdefs%3E%3ClinearGradient id="bg" x1="0%25" y1="0%25" x2="100%25" y2="100%25"%3E%3Cstop offset="0%25" style="stop-color:%236b73ff;stop-opacity:1" /%3E%3Cstop offset="100%25" style="stop-color:%239b59b6;stop-opacity:1" /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width="100%25" height="100%25" fill="url(%23bg)" /%3E%3Ctext x="50%25" y="45%25" text-anchor="middle" fill="white" font-size="20" font-family="Arial"%3E🏔️ 娄山关%3C/text%3E%3Ctext x="50%25" y="65%25" text-anchor="middle" fill="rgba(255,255,255,0.9)" font-size="14" font-family="Arial"%3E桐梓避暑胜地%3C/text%3E%3C/svg%3E');
    }

    .image-flower {
      background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg width="400" height="300" xmlns="http://www.w3.org/2000/svg"%3E%3Cdefs%3E%3ClinearGradient id="bg" x1="0%25" y1="0%25" x2="100%25" y2="100%25"%3E%3Cstop offset="0%25" style="stop-color:%23ff9a9e;stop-opacity:1" /%3E%3Cstop offset="100%25" style="stop-color:%23fecfef;stop-opacity:1" /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width="100%25" height="100%25" fill="url(%23bg)" /%3E%3Ctext x="50%25" y="45%25" text-anchor="middle" fill="white" font-size="20" font-family="Arial"%3E🌸 花海%3C/text%3E%3Ctext x="50%25" y="65%25" text-anchor="middle" fill="rgba(255,255,255,0.9)" font-size="14" font-family="Arial"%3E玉簪花云海%3C/text%3E%3C/svg%3E');
    }

    .image-slide {
      background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg width="400" height="300" xmlns="http://www.w3.org/2000/svg"%3E%3Cdefs%3E%3ClinearGradient id="bg" x1="0%25" y1="0%25" x2="100%25" y2="100%25"%3E%3Cstop offset="0%25" style="stop-color:%234ecdc4;stop-opacity:1" /%3E%3Cstop offset="100%25" style="stop-color:%2344a08d;stop-opacity:1" /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width="100%25" height="100%25" fill="url(%23bg)" /%3E%3Ctext x="50%25" y="45%25" text-anchor="middle" fill="white" font-size="20" font-family="Arial"%3E🛝 滑道%3C/text%3E%3Ctext x="50%25" y="65%25" text-anchor="middle" fill="rgba(255,255,255,0.9)" font-size="14" font-family="Arial"%3E山地游乐体验%3C/text%3E%3C/svg%3E');
    }

    .image-guiyang {
      background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg width="400" height="300" xmlns="http://www.w3.org/2000/svg"%3E%3Cdefs%3E%3ClinearGradient id="bg" x1="0%25" y1="0%25" x2="100%25" y2="100%25"%3E%3Cstop offset="0%25" style="stop-color:%23667eea;stop-opacity:1" /%3E%3Cstop offset="100%25" style="stop-color:%23764ba2;stop-opacity:1" /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width="100%25" height="100%25" fill="url(%23bg)" /%3E%3Ctext x="50%25" y="45%25" text-anchor="middle" fill="white" font-size="20" font-family="Arial"%3E🏙️ 贵阳%3C/text%3E%3Ctext x="50%25" y="65%25" text-anchor="middle" fill="rgba(255,255,255,0.9)" font-size="14" font-family="Arial"%3E甲秀楼城市风光%3C/text%3E%3C/svg%3E');
    }

    .image-monkey {
      background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg width="400" height="300" xmlns="http://www.w3.org/2000/svg"%3E%3Cdefs%3E%3ClinearGradient id="bg" x1="0%25" y1="0%25" x2="100%25" y2="100%25"%3E%3Cstop offset="0%25" style="stop-color:%23ffeaa7;stop-opacity:1" /%3E%3Cstop offset="100%25" style="stop-color:%23fab1a0;stop-opacity:1" /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width="100%25" height="100%25" fill="url(%23bg)" /%3E%3Ctext x="50%25" y="45%25" text-anchor="middle" fill="white" font-size="20" font-family="Arial"%3E🐒 猕猴%3C/text%3E%3Ctext x="50%25" y="65%25" text-anchor="middle" fill="rgba(255,255,255,0.9)" font-size="14" font-family="Arial"%3E黔灵山公园%3C/text%3E%3C/svg%3E');
    }

    .image-ancient {
      background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg width="400" height="300" xmlns="http://www.w3.org/2000/svg"%3E%3Cdefs%3E%3ClinearGradient id="bg" x1="0%25" y1="0%25" x2="100%25" y2="100%25"%3E%3Cstop offset="0%25" style="stop-color:%23a29bfe;stop-opacity:1" /%3E%3Cstop offset="100%25" style="stop-color:%236c5ce7;stop-opacity:1" /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width="100%25" height="100%25" fill="url(%23bg)" /%3E%3Ctext x="50%25" y="45%25" text-anchor="middle" fill="white" font-size="20" font-family="Arial"%3E🏛️ 古镇%3C/text%3E%3Ctext x="50%25" y="65%25" text-anchor="middle" fill="rgba(255,255,255,0.9)" font-size="14" font-family="Arial"%3E青岩古镇%3C/text%3E%3C/svg%3E');
    }

    .image-wetland {
      background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg width="400" height="300" xmlns="http://www.w3.org/2000/svg"%3E%3Cdefs%3E%3ClinearGradient id="bg" x1="0%25" y1="0%25" x2="100%25" y2="100%25"%3E%3Cstop offset="0%25" style="stop-color:%2300b894;stop-opacity:1" /%3E%3Cstop offset="100%25" style="stop-color:%2300a085;stop-opacity:1" /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width="100%25" height="100%25" fill="url(%23bg)" /%3E%3Ctext x="50%25" y="45%25" text-anchor="middle" fill="white" font-size="20" font-family="Arial"%3E🌿 湿地%3C/text%3E%3Ctext x="50%25" y="65%25" text-anchor="middle" fill="rgba(255,255,255,0.9)" font-size="14" font-family="Arial"%3E花溪湿地公园%3C/text%3E%3C/svg%3E');
    }

    .image-alpaca {
      background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg width="400" height="300" xmlns="http://www.w3.org/2000/svg"%3E%3Cdefs%3E%3ClinearGradient id="bg" x1="0%25" y1="0%25" x2="100%25" y2="100%25"%3E%3Cstop offset="0%25" style="stop-color:%23fd79a8;stop-opacity:1" /%3E%3Cstop offset="100%25" style="stop-color:%23e84393;stop-opacity:1" /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width="100%25" height="100%25" fill="url(%23bg)" /%3E%3Ctext x="50%25" y="45%25" text-anchor="middle" fill="white" font-size="20" font-family="Arial"%3E🦙 羊驼%3C/text%3E%3Ctext x="50%25" y="65%25" text-anchor="middle" fill="rgba(255,255,255,0.9)" font-size="14" font-family="Arial"%3E毕节羊驼小镇%3C/text%3E%3C/svg%3E');
    }

    .image-plateau {
      background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg width="400" height="300" xmlns="http://www.w3.org/2000/svg"%3E%3Cdefs%3E%3ClinearGradient id="bg" x1="0%25" y1="0%25" x2="100%25" y2="100%25"%3E%3Cstop offset="0%25" style="stop-color:%2355a3ff;stop-opacity:1" /%3E%3Cstop offset="100%25" style="stop-color:%233742fa;stop-opacity:1" /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width="100%25" height="100%25" fill="url(%23bg)" /%3E%3Ctext x="50%25" y="45%25" text-anchor="middle" fill="white" font-size="20" font-family="Arial"%3E🌾 韭菜坪%3C/text%3E%3Ctext x="50%25" y="65%25" text-anchor="middle" fill="rgba(255,255,255,0.9)" font-size="14" font-family="Arial"%3E阿西里西高原%3C/text%3E%3C/svg%3E');
    }

    .image-train {
      background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg width="400" height="300" xmlns="http://www.w3.org/2000/svg"%3E%3Cdefs%3E%3ClinearGradient id="bg" x1="0%25" y1="0%25" x2="100%25" y2="100%25"%3E%3Cstop offset="0%25" style="stop-color:%23ff7675;stop-opacity:1" /%3E%3Cstop offset="100%25" style="stop-color:%23d63031;stop-opacity:1" /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width="100%25" height="100%25" fill="url(%23bg)" /%3E%3Ctext x="50%25" y="45%25" text-anchor="middle" fill="white" font-size="20" font-family="Arial"%3E🚂 小火车%3C/text%3E%3Ctext x="50%25" y="65%25" text-anchor="middle" fill="rgba(255,255,255,0.9)" font-size="14" font-family="Arial"%3E观光体验%3C/text%3E%3C/svg%3E');
    }

    .image-ancient-town {
      background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg width="400" height="300" xmlns="http://www.w3.org/2000/svg"%3E%3Cdefs%3E%3ClinearGradient id="bg" x1="0%25" y1="0%25" x2="100%25" y2="100%25"%3E%3Cstop offset="0%25" style="stop-color:%23fdcb6e;stop-opacity:1" /%3E%3Cstop offset="100%25" style="stop-color:%23e17055;stop-opacity:1" /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width="100%25" height="100%25" fill="url(%23bg)" /%3E%3Ctext x="50%25" y="45%25" text-anchor="middle" fill="white" font-size="20" font-family="Arial"%3E🏮 古城%3C/text%3E%3Ctext x="50%25" y="65%25" text-anchor="middle" fill="rgba(255,255,255,0.9)" font-size="14" font-family="Arial"%3E叙永古城%3C/text%3E%3C/svg%3E');
    }

    .image-home {
      background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg width="400" height="300" xmlns="http://www.w3.org/2000/svg"%3E%3Cdefs%3E%3ClinearGradient id="bg" x1="0%25" y1="0%25" x2="100%25" y2="100%25"%3E%3Cstop offset="0%25" style="stop-color:%236c5ce7;stop-opacity:1" /%3E%3Cstop offset="100%25" style="stop-color:%23a29bfe;stop-opacity:1" /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width="100%25" height="100%25" fill="url(%23bg)" /%3E%3Ctext x="50%25" y="45%25" text-anchor="middle" fill="white" font-size="20" font-family="Arial"%3E🏠 温馨的家%3C/text%3E%3Ctext x="50%25" y="65%25" text-anchor="middle" fill="rgba(255,255,255,0.9)" font-size="14" font-family="Arial"%3E重庆翡翠华庭%3C/text%3E%3C/svg%3E');
    }

    .image-journey {
      background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg width="400" height="300" xmlns="http://www.w3.org/2000/svg"%3E%3Cdefs%3E%3ClinearGradient id="bg" x1="0%25" y1="0%25" x2="100%25" y2="100%25"%3E%3Cstop offset="0%25" style="stop-color:%2300b894;stop-opacity:1" /%3E%3Cstop offset="100%25" style="stop-color:%2355a3ff;stop-opacity:1" /%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width="100%25" height="100%25" fill="url(%23bg)" /%3E%3Ctext x="50%25" y="45%25" text-anchor="middle" fill="white" font-size="20" font-family="Arial"%3E✨ 美好回忆%3C/text%3E%3Ctext x="50%25" y="65%25" text-anchor="middle" fill="rgba(255,255,255,0.9)" font-size="14" font-family="Arial"%3E7天精彩旅程%3C/text%3E%3C/svg%3E');
    }

    .attraction-info {
      padding: 20px;
    }

    .attraction-name {
      font-size: 1.3rem;
      color: #333;
      margin-bottom: 10px;
      font-weight: 600;
    }

    .attraction-desc {
      color: #666;
      line-height: 1.5;
      margin-bottom: 15px;
    }

    .attraction-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .tag {
      background: #f0f0f0;
      color: #666;
      padding: 4px 12px;
      border-radius: 20px;
      font-size: 0.9rem;
    }

    .route-info {
      background: #f8f9fa;
      border-radius: 10px;
      padding: 15px;
      margin-top: 20px;
    }

    .route-info h4 {
      color: #667eea;
      margin-bottom: 10px;
    }

    .accommodation {
      background: linear-gradient(135deg, #667eea, #764ba2);
      color: white;
      padding: 15px;
      border-radius: 10px;
      margin-top: 15px;
    }

    .tips-section {
      background: white;
      border-radius: 20px;
      padding: 30px;
      margin-top: 40px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .tips-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 20px;
      margin-top: 20px;
    }

    .tip-item {
      background: #f8f9fa;
      padding: 20px;
      border-radius: 10px;
      border-left: 4px solid #667eea;
    }

    .tip-item h4 {
      color: #667eea;
      margin-bottom: 10px;
    }

    @media (max-width: 768px) {
      .container {
        padding: 15px;
      }

      .header h1 {
        font-size: 2.2rem;
      }

      .attractions {
        grid-template-columns: 1fr;
      }

      .day-header {
        flex-direction: column;
        text-align: center;
      }

      .day-number {
        margin-right: 0;
        margin-bottom: 15px;
      }
    }

    .loading {
      text-align: center;
      padding: 20px;
      color: #666;
    }

    .date-weather-section {
      background: rgba(255, 255, 255, 0.95);
      border-radius: 15px;
      padding: 20px;
      margin-bottom: 20px;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .date-weather-grid {
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 20px;
      align-items: center;
    }

    .date-info h4 {
      color: #667eea;
      font-size: 1.3rem;
      margin-bottom: 8px;
    }

    .date-detail {
      color: #666;
      font-size: 1rem;
    }

    .weather-widget {
      text-align: center;
      padding: 15px;
      background: linear-gradient(135deg, #667eea, #764ba2);
      border-radius: 10px;
      color: white;
    }

    .weather-temp {
      font-size: 2rem;
      font-weight: bold;
      margin-bottom: 5px;
    }

    .weather-desc {
      font-size: 0.9rem;
      opacity: 0.9;
    }

    .activities-section {
      margin-top: 20px;
      padding: 20px;
      background: #f8f9fa;
      border-radius: 10px;
    }

    .activities-section h4 {
      color: #667eea;
      margin-bottom: 15px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .activity-list {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 15px;
    }

    .activity-item {
      background: white;
      padding: 15px;
      border-radius: 8px;
      border-left: 4px solid #667eea;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .activity-item h5 {
      color: #333;
      margin-bottom: 8px;
      font-size: 1rem;
    }

    .activity-item p {
      color: #666;
      font-size: 0.9rem;
      line-height: 1.4;
    }

    .kids-friendly {
      background: linear-gradient(45deg, #ff9a9e, #fecfef);
      color: white;
    }

    .kids-friendly h5 {
      color: white;
    }

    .kids-friendly p {
      color: rgba(255, 255, 255, 0.9);
    }

    .dining-section {
      margin-top: 20px;
      padding: 20px;
      background: linear-gradient(135deg, #ffeaa7, #fab1a0);
      border-radius: 10px;
      color: #2d3436;
    }

    .dining-section h4 {
      margin-bottom: 15px;
      display: flex;
      align-items: center;
      gap: 8px;
      color: #2d3436;
    }

    .meal-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 15px;
    }

    .meal-item {
      background: rgba(255, 255, 255, 0.9);
      padding: 15px;
      border-radius: 8px;
      text-align: center;
    }

    .meal-time {
      font-weight: bold;
      color: #667eea;
      margin-bottom: 8px;
    }

    .meal-recommendation {
      font-size: 0.9rem;
      line-height: 1.4;
    }

    .weather-refresh {
      background: none;
      border: 1px solid rgba(255, 255, 255, 0.3);
      color: white;
      padding: 5px 10px;
      border-radius: 15px;
      cursor: pointer;
      font-size: 0.8rem;
      margin-top: 10px;
      transition: all 0.3s ease;
    }

    .weather-refresh:hover {
      background: rgba(255, 255, 255, 0.1);
    }

    @media (max-width: 768px) {
      .date-weather-grid {
        grid-template-columns: 1fr;
      }

      .meal-grid {
        grid-template-columns: 1fr;
      }

      .activity-list {
        grid-template-columns: 1fr;
      }
    }

    /* 地图相关动画 */
    @keyframes pulse {
      0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
      }
      70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
      }
      100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
      }
    }

    .pulse-animation {
      animation: pulse 2s infinite;
    }

    .map-legend {
      position: absolute;
      bottom: 20px;
      left: 20px;
      padding: 10px;
      background: rgba(255, 255, 255, 0.9);
      border-radius: 5px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
      z-index: 100;
      font-size: 12px;
      max-width: 200px;
    }
  </style>
</head>
<body>
<div class="container">
  <div class="header">
    <h1>🚗 贵州7天自驾游攻略</h1>
    <p>7月19日出发 · 避暑胜地 · 美景如画</p>
    <div style="margin-top: 15px; padding: 15px; background: rgba(255,255,255,0.9); border-radius: 15px; display: flex; align-items: center; gap: 15px; flex-wrap: wrap;">
      <div style="flex: 1; min-width: 200px;">
        <div style="color: #667eea; font-weight: bold; margin-bottom: 5px;">🏠 出发地 & 目的地</div>
        <div style="color: #333; font-size: 0.95rem;">重庆市渝北区金州大道107号翡翠华庭二期</div>
      </div>
      <div style="text-align: center; color: #667eea;">
        <div style="font-weight: bold; font-size: 1.2rem;">1240公里</div>
        <div style="font-size: 0.9rem;">总行程</div>
      </div>
      <div style="text-align: center; color: #667eea;">
        <div style="font-weight: bold; font-size: 1.2rem;">16.5小时</div>
        <div style="font-size: 0.9rem;">驾驶时间</div>
      </div>
    </div>

    <!-- API配置提示 -->
    <div id="apiTip" style="margin-top: 10px; padding: 10px; background: rgba(255,235,59,0.9); border-radius: 10px; font-size: 0.9rem; color: #e65100; display: none;">
      💡 <strong>配置提醒：</strong>请在代码中将"您的高德地图key"替换为您的真实API密钥，以获取实时天气和地图功能。
      <a href="https://console.amap.com/dev/key/app" target="_blank" style="color: #1976d2; text-decoration: none;">→ 获取API Key</a>
    </div>
  </div>

  <div class="weather-info">
    <h3>🌤️ 7月贵州天气指南</h3>
    <div class="weather-grid">
      <div class="weather-item">
        <div><strong>平均温度</strong></div>
        <div>19°C - 30°C</div>
      </div>
      <div class="weather-item">
        <div><strong>天气特点</strong></div>
        <div>清爽宜人，偶有阵雨</div>
      </div>
      <div class="weather-item">
        <div><strong>穿衣建议</strong></div>
        <div>轻薄长袖 + 防雨外套</div>
      </div>
      <div class="weather-item">
        <div><strong>最佳时段</strong></div>
        <div>早晚温差较大，需备外套</div>
      </div>
    </div>
  </div>

  <div class="map-container">
    <h3 style="margin-bottom: 15px; color: #333;">🗺️ 旅游路线图</h3>
    <div style="margin-bottom: 15px; display: flex; gap: 10px; flex-wrap: wrap;">
      <button id="distanceBtn" onclick="toggleRouteDistance()" style="background: linear-gradient(135deg, #ffeaa7, #fab1a0); color: #2d3436; border: none; padding: 10px 20px; border-radius: 25px; cursor: pointer; font-size: 14px;">
        📏 显示距离时间
      </button>
      <button onclick="centerToHome()" style="background: linear-gradient(135deg, #ff9a9e, #fecfef); color: white; border: none; padding: 10px 20px; border-radius: 25px; cursor: pointer; font-size: 14px;">
        🏠 定位到家
      </button>
    </div>
    <div id="mapContainer"></div>
  </div>

  <div class="itinerary">
    <!-- Day 1 -->
    <div class="day-card">
      <div class="day-header">
        <div class="day-number">1</div>
        <div class="day-title">遵义桐梓县 → 金沙玉簪花云海</div>
      </div>

      <div class="date-weather-section">
        <div class="date-weather-grid">
          <div class="date-info">
            <h4>📅 2024年7月19日 (星期五)</h4>
            <div class="date-detail">出发第一天 · 避暑寻花之旅开始</div>
          </div>
          <div class="weather-widget" id="weather-day1">
            <div class="weather-temp" id="temp-day1">加载中...</div>
            <div class="weather-desc" id="desc-day1">获取天气中</div>
            <button class="weather-refresh" onclick="updateWeather('day1', '桐梓县')" style="background: rgba(255,255,255,0.2); border: none; color: white; padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 11px; margin-top: 5px;">🔄 刷新天气</button>
          </div>
        </div>
      </div>

      <div class="attractions">
        <div class="attraction-card">
          <div class="attraction-image image-tongzi"></div>
          <div class="attraction-info">
            <div class="attraction-name">桐梓县·娄山关</div>
            <div class="attraction-desc">感受红色历史文化，体验清爽夏日。桐梓县海拔较高，夏季凉爽宜人，是避暑的好去处。可以游览娄山关、海龙屯等历史文化景点。</div>
            <div class="attraction-tags">
              <span class="tag">避暑胜地</span>
              <span class="tag">红色文化</span>
              <span class="tag">历史古迹</span>
              <span class="tag">2-3岁适宜</span>
            </div>
          </div>
        </div>
        <div class="attraction-card">
          <div class="attraction-image image-flower"></div>
          <div class="attraction-info">
            <div class="attraction-name">金沙玉簪花云海景区</div>
            <div class="attraction-desc">万亩玉簪花盛开，形成壮观的白色花海。配合山间云雾，宛如仙境。7月正是玉簪花的盛花期，不容错过。</div>
            <div class="attraction-tags">
              <span class="tag">花海</span>
              <span class="tag">云海</span>
              <span class="tag">摄影胜地</span>
              <span class="tag">亲子友好</span>
            </div>
          </div>
        </div>
      </div>

      <div class="activities-section">
        <h4>👶 2-3岁亲子游玩项目</h4>
        <div class="activity-list">
          <div class="activity-item kids-friendly">
            <h5>🌸 花海漫步</h5>
            <p>牵着小手在玉簪花海中慢慢散步，让宝宝感受花香，拍摄美美的亲子照片。路面平坦，推车通行无障碍。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🎠 观光小火车</h5>
            <p>乘坐景区观光小火车游览，小朋友最爱的交通工具，安全舒适，全程约30分钟，有遮阳棚。</p>
          </div>
          <div class="activity-item">
            <h5>📸 亲子摄影</h5>
            <p>在花海背景下拍摄全家福，留下美好回忆。建议穿浅色衣服与白色花海形成对比。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🦋 观察昆虫</h5>
            <p>花海中有很多蝴蝶和小昆虫，可以和宝宝一起观察大自然，培养观察力。</p>
          </div>
          <div class="activity-item">
            <h5>🏛️ 娄山关历史教育</h5>
            <p>在娄山关纪念馆短暂参观，虽然小朋友还不太懂历史，但可以看看展品和模型。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🌿 山间避暑</h5>
            <p>在树荫下休憩，让宝宝感受山林的清凉，呼吸新鲜空气，适合夏日避暑。</p>
          </div>
        </div>
      </div>

      <div class="dining-section">
        <h4>🍽️ 今日美食推荐</h4>
        <div class="meal-grid">
          <div class="meal-item">
            <div class="meal-time">早餐 (7:00-8:00)</div>
            <div class="meal-recommendation">
              <strong>出发前早餐</strong><br>
              小米粥 + 蒸蛋 + 小馒头<br>
              适合宝宝的温和食物
            </div>
          </div>
          <div class="meal-item">
            <div class="meal-time">午餐 (12:00-13:00)</div>
            <div class="meal-recommendation">
              <strong>桐梓县城</strong><br>
              黔北农家菜：竹筒饭、土鸡汤<br>
              推荐：桐梓羊肉粉（宝宝可喝汤）
            </div>
          </div>
          <div class="meal-item">
            <div class="meal-time">晚餐 (18:00-19:00)</div>
            <div class="meal-recommendation">
              <strong>金沙县城</strong><br>
              金沙特色：酸汤鱼、蒸蛋羹<br>
              儿童餐：白米饭 + 蒸蛋 + 青菜
            </div>
          </div>
        </div>
      </div>

      <div class="route-info">
        <h4>🚗 行程安排</h4>
        <p><strong>08:00</strong> 出发前往桐梓县 → <strong>10:00</strong> 抵达娄山关景区 → <strong>12:00</strong> 午餐 → <strong>14:00</strong> 前往金沙玉簪花云海 → <strong>16:00</strong> 花海游览 → <strong>18:00</strong> 晚餐 → <strong>20:00</strong> 入住休息</p>
      </div>
      <div class="accommodation">
        <strong>🏨 住宿：</strong>金沙玉簪花云海景区内度假酒店（推荐：花海度假村，有儿童游乐设施）
      </div>
    </div>

    <!-- Day 2 -->
    <div class="day-card">
      <div class="day-header">
        <div class="day-number">2</div>
        <div class="day-title">玉簪花云海 → 贵阳市区</div>
      </div>

      <div class="date-weather-section">
        <div class="date-weather-grid">
          <div class="date-info">
            <h4>📅 2024年7月20日 (星期六)</h4>
            <div class="date-detail">第二天 · 体验游乐前往省会</div>
          </div>
          <div class="weather-widget" id="weather-day2">
            <div class="weather-temp" id="temp-day2">加载中...</div>
            <div class="weather-desc" id="desc-day2">获取天气中</div>
            <button class="weather-refresh" onclick="updateWeather('day2', '贵阳市')">🔄 刷新天气</button>
          </div>
        </div>
      </div>

      <div class="attractions">
        <div class="attraction-card">
          <div class="attraction-image image-slide"></div>
          <div class="attraction-info">
            <div class="attraction-name">山地滑道 & 史努比电瓶车</div>
            <div class="attraction-desc">体验惊险刺激的山地滑道，乘坐可爱的三轮史努比电瓶车游览景区，适合全家人一起游玩。有专为幼儿设计的缓坡滑道。</div>
            <div class="attraction-tags">
              <span class="tag">亲子游乐</span>
              <span class="tag">安全刺激</span>
              <span class="tag">家庭出游</span>
              <span class="tag">2-3岁友好</span>
            </div>
          </div>
        </div>
        <div class="attraction-card">
          <div class="attraction-image image-guiyang"></div>
          <div class="attraction-info">
            <div class="attraction-name">贵阳市区漫游</div>
            <div class="attraction-desc">下午抵达贵阳后，可游览甲秀楼、花果园双子塔、贵阳老城等标志性景点，感受贵州省会的现代魅力。市区有很多适合推车的步行区域。</div>
            <div class="attraction-tags">
              <span class="tag">城市观光</span>
              <span class="tag">地标建筑</span>
              <span class="tag">夜景</span>
              <span class="tag">推车友好</span>
            </div>
          </div>
        </div>
      </div>

      <div class="activities-section">
        <h4>👶 2-3岁亲子游玩项目</h4>
        <div class="activity-list">
          <div class="activity-item kids-friendly">
            <h5>🎠 史努比电瓶车</h5>
            <p>可爱的卡通造型电瓶车，三轮设计稳定安全，速度缓慢，宝宝可以坐在中间享受乘坐乐趣。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🛝 儿童缓坡滑道</h5>
            <p>专为小朋友设计的缓坡滑道，坡度平缓，有护栏保护，家长可以抱着宝宝一起滑下来。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🌸 晨间花海</h5>
            <p>早晨的花海最美，空气清新，温度适宜，让宝宝在花海中自由爬行玩耍。</p>
          </div>
          <div class="activity-item">
            <h5>🏛️ 甲秀楼远观</h5>
            <p>在甲秀楼外拍照留念，楼内爬楼梯对小朋友不太适合，但外观很漂亮适合拍照。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🌳 花果园步行区</h5>
            <p>花果园有宽敞的步行区域，可以推车慢慢逛，有很多好看的建筑和绿化。</p>
          </div>
          <div class="activity-item">
            <h5>🎡 商场游乐区</h5>
            <p>贵阳各大商场都有儿童游乐区，可以让宝宝在安全的室内环境玩耍，避暑休息。</p>
          </div>
        </div>
      </div>

      <div class="dining-section">
        <h4>🍽️ 今日美食推荐</h4>
        <div class="meal-grid">
          <div class="meal-item">
            <div class="meal-time">早餐 (7:30-8:30)</div>
            <div class="meal-recommendation">
              <strong>酒店早餐</strong><br>
              稀饭 + 蒸蛋 + 小包子<br>
              酒店儿童餐具，营养搭配
            </div>
          </div>
          <div class="meal-item">
            <div class="meal-time">午餐 (12:00-13:00)</div>
            <div class="meal-recommendation">
              <strong>路上服务区</strong><br>
              简餐：蒸蛋羹、小馄饨<br>
              推荐：婴儿辅食+温开水
            </div>
          </div>
          <div class="meal-item">
            <div class="meal-time">晚餐 (18:30-19:30)</div>
            <div class="meal-recommendation">
              <strong>贵阳丝娃娃店</strong><br>
              经典贵阳小吃体验<br>
              儿童可选：白米饭+清汤+蔬菜泥
            </div>
          </div>
        </div>
      </div>

      <div class="route-info">
        <h4>🚗 行程安排</h4>
        <p><strong>08:30</strong> 体验滑道和电瓶车 → <strong>10:30</strong> 最后花海拍照 → <strong>12:00</strong> 服务区午餐 → <strong>14:30</strong> 抵达贵阳 → <strong>15:30</strong> 甲秀楼游览 → <strong>17:00</strong> 花果园观光 → <strong>18:30</strong> 晚餐</p>
      </div>
      <div class="accommodation">
        <strong>🏨 住宿：</strong>贵阳市区亲子酒店（推荐：贵阳喜来登酒店或君悦酒店，有儿童设施）
      </div>
    </div>

    <!-- Day 3 -->
    <div class="day-card">
      <div class="day-header">
        <div class="day-number">3</div>
        <div class="day-title">贵阳黔灵山公园动物园</div>
      </div>

      <div class="date-weather-section">
        <div class="date-weather-grid">
          <div class="date-info">
            <h4>📅 2024年7月21日 (星期日)</h4>
            <div class="date-detail">第三天 · 与动物亲密接触</div>
          </div>
          <div class="weather-widget" id="weather-day3">
            <div class="weather-temp" id="temp-day3">加载中...</div>
            <div class="weather-desc" id="desc-day3">获取天气中</div>
            <button class="weather-refresh" onclick="updateWeather('day3', '贵阳市')">🔄 刷新天气</button>
          </div>
        </div>
      </div>

      <div class="attractions">
        <div class="attraction-card">
          <div class="attraction-image image-monkey"></div>
          <div class="attraction-info">
            <div class="attraction-name">黔灵山公园动物园</div>
            <div class="attraction-desc">贵阳市民的后花园，有野生猕猴、动物园、弘福寺等景点。可以与猕猴近距离接触，体验城市中的自然野趣。园内路面平整，适合推车。</div>
            <div class="attraction-tags">
              <span class="tag">野生动物</span>
              <span class="tag">城市公园</span>
              <span class="tag">休闲漫步</span>
              <span class="tag">婴幼儿适宜</span>
            </div>
          </div>
        </div>
        <div class="attraction-card">
          <div class="attraction-image image-ancient"></div>
          <div class="attraction-info">
            <div class="attraction-name">青岩古镇</div>
            <div class="attraction-desc">明清古建筑群，石板街道，古色古香。虽有石阶但主街道平坦，可推车游览。有很多小吃店和手工艺品。</div>
            <div class="attraction-tags">
              <span class="tag">古镇文化</span>
              <span class="tag">明清建筑</span>
              <span class="tag">特色小吃</span>
              <span class="tag">文化体验</span>
            </div>
          </div>
        </div>
      </div>

      <div class="activities-section">
        <h4>👶 2-3岁亲子游玩项目</h4>
        <div class="activity-list">
          <div class="activity-item kids-friendly">
            <h5>🐒 观看猕猴</h5>
            <p>与野生猕猴近距离接触，宝宝对动物非常好奇，可以观察猕猴的行为，但要注意安全距离。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🦢 湖边喂鸭子</h5>
            <p>黔灵湖有很多鸭子和天鹅，可以带面包屑喂食，宝宝会很开心看到小动物聚集过来。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🌳 林荫步道散步</h5>
            <p>公园内树木繁茂，空气清新，推车在林荫道上慢慢走，让宝宝感受自然环境。</p>
          </div>
          <div class="activity-item">
            <h5>🏛️ 弘福寺参观</h5>
            <p>古寺环境清幽，虽然宝宝不懂宗教，但可以感受宁静的氛围，锻炼爬台阶能力。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🏰 青岩古镇石板路</h5>
            <p>在古镇主街道推车慢逛，看古老建筑，品尝特色小食，体验历史文化氛围。</p>
          </div>
          <div class="activity-item">
            <h5>🎨 手工艺品观摩</h5>
            <p>古镇有很多手工艺人现场制作，宝宝可以观看制作过程，培养对手工的兴趣。</p>
          </div>
        </div>
      </div>

      <div class="dining-section">
        <h4>🍽️ 今日美食推荐</h4>
        <div class="meal-grid">
          <div class="meal-item">
            <div class="meal-time">早餐 (8:00-9:00)</div>
            <div class="meal-recommendation">
              <strong>酒店自助早餐</strong><br>
              白粥 + 煮蛋 + 蒸饺<br>
              新鲜水果 + 酸奶（适合宝宝）
            </div>
          </div>
          <div class="meal-item">
            <div class="meal-time">午餐 (12:30-13:30)</div>
            <div class="meal-recommendation">
              <strong>黔灵山公园内</strong><br>
              简餐：蒸蛋羹、小馄饨<br>
              推荐：自带宝宝辅食更安全
            </div>
          </div>
          <div class="meal-item">
            <div class="meal-time">晚餐 (18:00-19:00)</div>
            <div class="meal-recommendation">
              <strong>青岩古镇特色</strong><br>
              青岩豆腐、状元蹄、米豆腐<br>
              儿童餐：白粥+蒸蛋+青菜
            </div>
          </div>
        </div>
      </div>

      <div class="route-info">
        <h4>🚗 行程安排</h4>
        <p><strong>09:00</strong> 前往黔灵山公园 → <strong>09:30</strong> 观看猕猴、游览动物园 → <strong>12:00</strong> 园内午餐 → <strong>14:00</strong> 前往青岩古镇 → <strong>15:00</strong> 古镇游览 → <strong>18:00</strong> 古镇晚餐 → <strong>20:00</strong> 返回贵阳</p>
      </div>
      <div class="accommodation">
        <strong>🏨 住宿：</strong>贵阳市区亲子酒店（续住昨晚酒店）
      </div>
    </div>

    <!-- Day 4 -->
    <div class="day-card">
      <div class="day-header">
        <div class="day-number">4</div>
        <div class="day-title">贵阳 → 毕节羊驼小镇</div>
      </div>

      <div class="date-weather-section">
        <div class="date-weather-grid">
          <div class="date-info">
            <h4>📅 2024年7月22日 (星期一)</h4>
            <div class="date-detail">第四天 · 萌宠互动乐园</div>
          </div>
          <div class="weather-widget" id="weather-day4">
            <div class="weather-temp" id="temp-day4">加载中...</div>
            <div class="weather-desc" id="desc-day4">获取天气中</div>
            <button class="weather-refresh" onclick="updateWeather('day4', '毕节市')">🔄 刷新天气</button>
          </div>
        </div>
      </div>

      <div class="attractions">
        <div class="attraction-card">
          <div class="attraction-image image-wetland"></div>
          <div class="attraction-info">
            <div class="attraction-name">花溪国家城市湿地公园</div>
            <div class="attraction-desc">贵阳最美的湿地公园，有大片草坪、清澈河流，空气清新，非常适合带小朋友游玩。步道平坦，推车无障碍。</div>
            <div class="attraction-tags">
              <span class="tag">湿地生态</span>
              <span class="tag">亲子野餐</span>
              <span class="tag">推车友好</span>
              <span class="tag">免费开放</span>
            </div>
          </div>
        </div>
        <div class="attraction-card">
          <div class="attraction-image image-alpaca"></div>
          <div class="attraction-info">
            <div class="attraction-name">毕节羊驼小镇</div>
            <div class="attraction-desc">可爱的羊驼乐园，孩子们的天堂。可以近距离接触羊驼，拍照留念，感受这些萌萌哒小动物的魅力。有专门的婴幼儿互动区域。</div>
            <div class="attraction-tags">
              <span class="tag">萌宠乐园</span>
              <span class="tag">亲子互动</span>
              <span class="tag">拍照打卡</span>
              <span class="tag">2-3岁最爱</span>
            </div>
          </div>
        </div>
      </div>

      <div class="activities-section">
        <h4>👶 2-3岁亲子游玩项目</h4>
        <div class="activity-list">
          <div class="activity-item kids-friendly">
            <h5>🌱 湿地草坪爬行</h5>
            <p>花溪湿地公园有大片柔软草坪，可以让宝宝自由爬行、学走路，安全无污染。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🦆 观看水鸟</h5>
            <p>湿地有很多水鸟，宝宝可以观察它们的飞翔和游泳，培养对自然的兴趣。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🦙 抚摸羊驼</h5>
            <p>在工作人员指导下轻抚羊驼，这些温和的动物很适合小朋友接触，毛茸茸的触感很舒服。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🥕 喂食体验</h5>
            <p>用专门的饲料喂羊驼，宝宝会很兴奋看到动物吃东西，培养爱心和责任感。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>📷 萌照拍摄</h5>
            <p>与羊驼合影，这些天然呆萌的表情会让照片特别可爱，是绝佳的亲子照素材。</p>
          </div>
          <div class="activity-item">
            <h5>🚜 小火车环园</h5>
            <p>乘坐园区观光小火车，宝宝最喜欢这种交通工具，可以轻松游览整个园区。</p>
          </div>
        </div>
      </div>

      <div class="dining-section">
        <h4>🍽️ 今日美食推荐</h4>
        <div class="meal-grid">
          <div class="meal-item">
            <div class="meal-time">早餐 (8:00-9:00)</div>
            <div class="meal-recommendation">
              <strong>酒店早餐</strong><br>
              瘦肉粥 + 煮蛋 + 小包子<br>
              温牛奶 + 苹果泥（宝宝专用）
            </div>
          </div>
          <div class="meal-item">
            <div class="meal-time">午餐 (12:00-13:00)</div>
            <div class="meal-recommendation">
              <strong>花溪公园附近</strong><br>
              花溪牛肉粉、凉拌折耳根<br>
              儿童餐：白粥+蒸蛋+蔬菜泥
            </div>
          </div>
          <div class="meal-item">
            <div class="meal-time">晚餐 (18:00-19:00)</div>
            <div class="meal-recommendation">
              <strong>毕节特色菜</strong><br>
              毕节臭豆腐、酸菜鱼<br>
              儿童可选：蒸蛋羹+青菜面条
            </div>
          </div>
        </div>
      </div>

      <div class="route-info">
        <h4>🚗 行程安排</h4>
        <p><strong>09:00</strong> 前往花溪湿地公园 → <strong>10:00</strong> 草坪游玩观鸟 → <strong>12:00</strong> 附近午餐 → <strong>14:00</strong> 驱车前往毕节（约2.5小时） → <strong>16:30</strong> 抵达羊驼小镇 → <strong>17:00</strong> 与羊驼互动 → <strong>18:00</strong> 晚餐</p>
      </div>
      <div class="accommodation">
        <strong>🏨 住宿：</strong>毕节羊驼小镇度假酒店（推荐：园区内小木屋，有婴儿床）
      </div>
    </div>

    <!-- Day 5 -->
    <div class="day-card">
      <div class="day-header">
        <div class="day-number">5</div>
        <div class="day-title">羊驼小镇 → 阿西里西大草原</div>
      </div>

      <div class="date-weather-section">
        <div class="date-weather-grid">
          <div class="date-info">
            <h4>📅 2024年7月23日 (星期二)</h4>
            <div class="date-detail">第五天 · 高原花海震撼</div>
          </div>
          <div class="weather-widget" id="weather-day5">
            <div class="weather-temp" id="temp-day5">加载中...</div>
            <div class="weather-desc" id="desc-day5">获取天气中</div>
            <button class="weather-refresh" onclick="updateWeather('day5', '阿西里西')">🔄 刷新天气</button>
          </div>
        </div>
      </div>

      <div class="attractions">
        <div class="attraction-card">
          <div class="attraction-image image-alpaca"></div>
          <div class="attraction-info">
            <div class="attraction-name">羊驼小镇晨游</div>
            <div class="attraction-desc">早上继续在羊驼小镇游玩，与可爱的羊驼们亲密接触，享受治愈系的美好时光。晨光中的羊驼特别温顺。</div>
            <div class="attraction-tags">
              <span class="tag">治愈系</span>
              <span class="tag">晨光美好</span>
              <span class="tag">动物互动</span>
              <span class="tag">2-3岁喜爱</span>
            </div>
          </div>
        </div>
        <div class="attraction-card">
          <div class="attraction-image image-plateau"></div>
          <div class="attraction-info">
            <div class="attraction-name">阿西里西韭菜坪</div>
            <div class="attraction-desc">中国最大的连片韭菜花海，7-9月是最佳观赏期。漫山遍野的紫色韭菜花，配合高原草甸，美不胜收。海拔较高，注意保暖。</div>
            <div class="attraction-tags">
              <span class="tag">花海奇观</span>
              <span class="tag">高原草甸</span>
              <span class="tag">摄影天堂</span>
              <span class="tag">注意保暖</span>
            </div>
          </div>
        </div>
      </div>

      <div class="activities-section">
        <h4>👶 2-3岁亲子游玩项目</h4>
        <div class="activity-list">
          <div class="activity-item kids-friendly">
            <h5>🦙 早晨喂羊驼</h5>
            <p>清晨的羊驼精神状态最好，食欲旺盛，宝宝可以体验喂食的乐趣，观察动物的进食行为。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>📸 羊驼合影时光</h5>
            <p>与羊驼拍摄更多可爱照片，不同光线下的效果不同，为宝宝留下珍贵回忆。</p>
          </div>
          <div class="activity-item">
            <h5>🌸 韭菜花观赏</h5>
            <p>虽然宝宝还不能完全理解花海之美，但紫色的花朵会吸引他们的注意力，培养美感。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🚗 观光车游览</h5>
            <p>乘坐观光车穿越花海，既能看风景又不累，适合小朋友的体力和注意力。</p>
          </div>
          <div class="activity-item">
            <h5>🌿 高原草甸漫步</h5>
            <p>在平缓的草甸上让宝宝练习走路，高原空气清新，但要注意不要过度运动。</p>
          </div>
          <div class="activity-item">
            <h5>☁️ 观云海日落</h5>
            <p>如天气允许，可以看到壮观的云海和日落，虽然宝宝可能会困，但是难得的自然奇观。</p>
          </div>
        </div>
      </div>

      <div class="dining-section">
        <h4>🍽️ 今日美食推荐</h4>
        <div class="meal-grid">
          <div class="meal-item">
            <div class="meal-time">早餐 (7:30-8:30)</div>
            <div class="meal-recommendation">
              <strong>小镇度假村</strong><br>
              热粥 + 煮蛋 + 面包<br>
              温牛奶（高原地区要补充热量）
            </div>
          </div>
          <div class="meal-item">
            <div class="meal-time">午餐 (12:30-13:30)</div>
            <div class="meal-recommendation">
              <strong>路餐或打包</strong><br>
              简餐：面条+鸡蛋<br>
              建议：自带宝宝辅食和热水
            </div>
          </div>
          <div class="meal-item">
            <div class="meal-time">晚餐 (18:30-19:30)</div>
            <div class="meal-recommendation">
              <strong>韭菜坪农家乐</strong><br>
              高原土豆、炖鸡汤<br>
              儿童餐：鸡蛋羹+软烂米饭
            </div>
          </div>
        </div>
      </div>

      <div class="route-info">
        <h4>🚗 行程安排</h4>
        <p><strong>08:00</strong> 羊驼小镇晨游 → <strong>10:30</strong> 退房前往韭菜坪（约2小时车程） → <strong>12:30</strong> 路餐休息 → <strong>14:30</strong> 抵达韭菜坪 → <strong>15:00</strong> 乘观光车游花海 → <strong>17:00</strong> 草甸漫步 → <strong>18:30</strong> 晚餐</p>
      </div>
      <div class="accommodation">
        <strong>🏨 住宿：</strong>韭菜坪高原度假村（推荐：有暖气的家庭房，海拔高夜晚较冷）
      </div>
    </div>

    <!-- Day 6 -->
    <div class="day-card">
      <div class="day-header">
        <div class="day-number">6</div>
        <div class="day-title">阿西里西韭菜坪 → 叙永县</div>
      </div>

      <div class="date-weather-section">
        <div class="date-weather-grid">
          <div class="date-info">
            <h4>📅 2024年7月24日 (星期三)</h4>
            <div class="date-detail">第六天 · 火车观光启程返家</div>
          </div>
          <div class="weather-widget" id="weather-day6">
            <div class="weather-temp" id="temp-day6">加载中...</div>
            <div class="weather-desc" id="desc-day6">获取天气中</div>
            <button class="weather-refresh" onclick="updateWeather('day6', '叙永县')">🔄 刷新天气</button>
          </div>
        </div>
      </div>

      <div class="attractions">
        <div class="attraction-card">
          <div class="attraction-image image-train"></div>
          <div class="attraction-info">
            <div class="attraction-name">韭菜坪观光小火车</div>
            <div class="attraction-desc">乘坐观光小火车穿越花海，观看草原风车，感受高原的清新空气和壮美景色。车厢内有暖气，适合小朋友乘坐。</div>
            <div class="attraction-tags">
              <span class="tag">观光火车</span>
              <span class="tag">风车景观</span>
              <span class="tag">高原风光</span>
              <span class="tag">小朋友最爱</span>
            </div>
          </div>
        </div>
        <div class="attraction-card">
          <div class="attraction-image image-ancient-town"></div>
          <div class="attraction-info">
            <div class="attraction-name">叙永县</div>
            <div class="attraction-desc">四川南部古县，有着悠久的历史文化。可游览叙永古城、春秋祠等古迹，感受川南文化韵味。县城海拔较低，气候温和。</div>
            <div class="attraction-tags">
              <span class="tag">古城文化</span>
              <span class="tag">川南风情</span>
              <span class="tag">历史古迹</span>
              <span class="tag">休息中转</span>
            </div>
          </div>
        </div>
      </div>

      <div class="activities-section">
        <h4>👶 2-3岁亲子游玩项目</h4>
        <div class="activity-list">
          <div class="activity-item kids-friendly">
            <h5>🚂 观光小火车</h5>
            <p>这是宝宝最喜欢的交通工具！火车穿越花海和草甸，车窗风景不断变化，很能吸引小朋友注意力。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🌪️ 观看大风车</h5>
            <p>巨大的白色风车在草原上转动，宝宝会很好奇这些"大风车"，可以远观拍照。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🌈 高原最后拍照</h5>
            <p>在高原最后留影，蓝天白云做背景，记录宝宝在高海拔地区的可爱瞬间。</p>
          </div>
          <div class="activity-item">
            <h5>🏛️ 叙永古城漫步</h5>
            <p>在古城老街上推车慢走，感受川南古镇的宁静氛围，为返程做最后的文化体验。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🛀 温水洗澡</h5>
            <p>从高原下来，在叙永县城给宝宝洗个热水澡，洗去旅途疲劳，准备明天返程。</p>
          </div>
          <div class="activity-item">
            <h5>🛍️ 特产采购</h5>
            <p>为家人朋友购买贵州特产，如茶叶、辣椒等，也给宝宝买些纪念品。</p>
          </div>
        </div>
      </div>

      <div class="dining-section">
        <h4>🍽️ 今日美食推荐</h4>
        <div class="meal-grid">
          <div class="meal-item">
            <div class="meal-time">早餐 (7:00-8:00)</div>
            <div class="meal-recommendation">
              <strong>度假村早餐</strong><br>
              热腾腾的白粥+鸡蛋<br>
              高原最后一顿温暖早餐
            </div>
          </div>
          <div class="meal-item">
            <div class="meal-time">午餐 (12:00-13:00)</div>
            <div class="meal-recommendation">
              <strong>高速服务区</strong><br>
              简餐：蒸蛋羹+面条<br>
              路餐以安全卫生为主
            </div>
          </div>
          <div class="meal-item">
            <div class="meal-time">晚餐 (18:00-19:00)</div>
            <div class="meal-recommendation">
              <strong>叙永川菜馆</strong><br>
              川南家常菜：回锅肉、蒸蛋<br>
              儿童餐：白米饭+鸡蛋汤
            </div>
          </div>
        </div>
      </div>

      <div class="route-info">
        <h4>🚗 行程安排</h4>
        <p><strong>08:00</strong> 乘坐观光小火车 → <strong>10:00</strong> 观看风车拍照 → <strong>11:00</strong> 退房前往叙永（约3小时车程） → <strong>14:00</strong> 抵达叙永县 → <strong>15:00</strong> 古城漫步 → <strong>17:00</strong> 采购特产 → <strong>18:00</strong> 晚餐</p>
      </div>
      <div class="accommodation">
        <strong>🏨 住宿：</strong>叙永县商务酒店（推荐：叙永宾馆或其他有儿童设施的酒店，为返程做好准备）
      </div>
    </div>

    <!-- Day 7 -->
    <div class="day-card">
      <div class="day-header">
        <div class="day-number">7</div>
        <div class="day-title">叙永县 → 返程回家</div>
      </div>

      <div class="date-weather-section">
        <div class="date-weather-grid">
          <div class="date-info">
            <h4>📅 2024年7月25日 (星期四)</h4>
            <div class="date-detail">第七天 · 满载回忆温馨返程</div>
          </div>
          <div class="weather-widget" id="weather-day7">
            <div class="weather-temp" id="temp-day7">加载中...</div>
            <div class="weather-desc" id="desc-day7">获取天气中</div>
            <button class="weather-refresh" onclick="updateWeather('day7', '叙永县')">🔄 刷新天气</button>
          </div>
        </div>
      </div>

      <div class="attractions">
        <div class="attraction-card">
          <div class="attraction-image image-home"></div>
          <div class="attraction-info">
            <div class="attraction-name">愉快返程</div>
            <div class="attraction-desc">在叙永县稍作休整，享用早餐后开始返程之旅。带着满满的回忆和美好的体验，结束这次精彩的贵州避暑之旅。确保宝宝安全舒适地回家。</div>
            <div class="attraction-tags">
              <span class="tag">圆满结束</span>
              <span class="tag">美好回忆</span>
              <span class="tag">安全返程</span>
              <span class="tag">亲子回忆</span>
            </div>
          </div>
        </div>
        <div class="attraction-card">
          <div class="attraction-image image-journey"></div>
          <div class="attraction-info">
            <div class="attraction-name">7天旅行回顾</div>
            <div class="attraction-desc">回顾这7天的精彩旅程：从桐梓避暑到玉簪花海，从贵阳探索到羊驼互动，从韭菜花海到川南古镇，每一天都充满了惊喜和快乐。</div>
            <div class="attraction-tags">
              <span class="tag">回忆满满</span>
              <span class="tag">成长记录</span>
              <span class="tag">家庭时光</span>
              <span class="tag">避暑成功</span>
            </div>
          </div>
        </div>
      </div>

      <div class="activities-section">
        <h4>� 返程准备和回忆</h4>
        <div class="activity-list">
          <div class="activity-item kids-friendly">
            <h5>📱 整理照片</h5>
            <p>在回程路上整理这几天拍摄的美好照片，为宝宝制作成长相册，记录第一次长途旅行。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🧳 打包行李</h5>
            <p>让宝宝参与简单的打包工作，培养整理能力，把旅行纪念品小心收好。</p>
          </div>
          <div class="activity-item">
            <h5>🚗 舒适返程</h5>
            <p>合理安排返程时间，每2小时休息一次，确保宝宝在车上舒适安全。</p>
          </div>
          <div class="activity-item kids-friendly">
            <h5>🎵 回忆分享</h5>
            <p>在车上和宝宝回忆这几天看到的动物、美景，虽然他们还小，但参与感很重要。</p>
          </div>
          <div class="activity-item">
            <h5>🏠 到家惊喜</h5>
            <p>回到家后，为宝宝准备一个小惊喜，庆祝第一次长途旅行成功完成。</p>
          </div>
          <div class="activity-item">
            <h5>📝 旅行总结</h5>
            <p>记录这次旅行的收获和经验，为以后的亲子旅行提供参考和改进建议。</p>
          </div>
        </div>
      </div>

      <div class="dining-section">
        <h4>🍽️ 返程餐食安排</h4>
        <div class="meal-grid">
          <div class="meal-item">
            <div class="meal-time">早餐 (7:30-8:30)</div>
            <div class="meal-recommendation">
              <strong>酒店丰盛早餐</strong><br>
              营养粥 + 煮蛋 + 包子<br>
              为返程路上补充体力
            </div>
          </div>
          <div class="meal-item">
            <div class="meal-time">午餐 (12:30-13:30)</div>
            <div class="meal-recommendation">
              <strong>高速服务区</strong><br>
              安全卫生的简餐<br>
              重点：宝宝辅食和温开水
            </div>
          </div>
          <div class="meal-item">
            <div class="meal-time">晚餐 (18:00-19:00)</div>
            <div class="meal-recommendation">
              <strong>到家庆祝餐</strong><br>
              家常菜或外卖<br>
              庆祝旅行圆满成功！
            </div>
          </div>
        </div>
      </div>

      <div class="route-info">
        <h4>🚗 返程安排</h4>
        <p><strong>08:30</strong> 酒店退房 → <strong>09:00</strong> 开始返程 → <strong>11:00</strong> 第一次休息 → <strong>12:30</strong> 服务区午餐 → <strong>15:00</strong> 第二次休息 → <strong>18:00</strong> 预计到家（具体时间根据实际距离调整）</p>

        <div style="margin-top: 15px; padding: 15px; background: #e8f4fd; border-radius: 8px;">
          <h4 style="color: #1976d2; margin-bottom: 10px;">🎉 旅行收获总结</h4>
          <ul style="margin: 0; padding-left: 20px; color: #666;">
            <li>宝宝第一次长途旅行，适应能力得到锻炼</li>
            <li>接触了多种动物：猕猴、羊驼、水鸟等</li>
            <li>体验了不同景观：花海、草甸、古镇、湿地</li>
            <li>乘坐了各种交通工具：小火车、电瓶车、观光车</li>
            <li>增进了亲子感情，创造了美好回忆</li>
            <li>成功避暑，7月贵州之行舒适宜人</li>
          </ul>
        </div>
      </div>
    </div>
  </div>

  <div class="tips-section">
    <h3>📋 贵州7月自驾游实用贴士</h3>
    <div class="tips-grid">
      <div class="tip-item">
        <h4>🚗 自驾准备</h4>
        <p>检查车辆状况，准备防滑链（山区可能需要）。贵州山路较多，注意安全驾驶。建议提前规划加油站位置。</p>
      </div>
      <div class="tip-item">
        <h4>🌦️ 天气应对</h4>
        <p>7月贵州偶有阵雨，准备雨具和防滑鞋。早晚温差大，需备薄外套。防晒用品必备。</p>
      </div>
      <div class="tip-item">
        <h4>🎒 装备清单</h4>
        <p>轻便雨衣、防晒霜、墨镜、舒适步行鞋、移动电源、常用药品、高原地区适量氧气瓶。</p>
      </div>
      <div class="tip-item">
        <h4>🍜 美食推荐</h4>
        <p>酸汤鱼、丝娃娃、肠旺面、豆腐圆子、糯米饭、米豆腐等贵州特色美食不容错过。</p>
      </div>
      <div class="tip-item">
        <h4>💰 费用预算</h4>
        <p>住宿：200-500元/晚；餐饮：100-200元/人/天；门票：50-150元/景点；油费：约2000-3000元。</p>
      </div>
      <div class="tip-item">
        <h4>📱 实用APP</h4>
        <p>高德地图（导航）、美团（住宿餐饮）、天气通（天气预报）、大众点评（景点评价）。</p>
      </div>
    </div>
  </div>
</div>

<script>
  // 全局变量
  var map;
  var routeDistances = [];
  var totalDistance = 0;
  var totalTime = 0;

  // 初始化地图
  function initMap() {
    // 创建地图实例
    map = new AMap.Map('mapContainer', {
      zoom: 7,
      center: [106.63, 26.65], // 贵州省中心位置
      mapStyle: 'amap://styles/blue'
    });

    // 完整旅游路线的关键点（包含家的位置）
    var routePoints = [
      [106.51204, 29.644195],  // 重庆渝北区翡翠华庭二期（家）
      [106.828018,28.123388],       // 桐梓县
      [106.262792,27.552968],         // 金沙县玉簪花云海
      [106.638229,26.639666],         // 贵阳市
      [106.28736,27.277884],           // 毕节羊驼小镇
      [104.864101,27.012104],          // 阿西里西韭菜坪
      [105.43288,28.173955],         // 叙永县
      [106.51204, 29.644195]   // 返回重庆家中
    ];

    var routeNames = [
      '🏠 重庆翡翠华庭（家）',
      '桐梓县娄山关',
      '金沙玉簪花云海',
      '贵阳市区',
      '毕节羊驼小镇',
      '阿西里西韭菜坪',
      '叙永县',
      '🏠 重庆翡翠华庭（家）'
    ];

    var routeDates = [
      '出发地',
      'Day1 - 7月19日',
      'Day1 - 7月19日',
      'Day2 - 7月20日',
      'Day4 - 7月22日',
      'Day5 - 7月23日',
      'Day6 - 7月24日',
      'Day7 - 7月25日'
    ];

    // 添加标记点
    routePoints.forEach(function (point, index) {
      var isHome = index === 0 || index === routePoints.length - 1;
      var markerColor = isHome ? '#ff6b6b' : '#667eea';
      var markerIcon = isHome ? '🏠' : (index);

      var marker = new AMap.Marker({
        position: point,
        title: routeNames[index],
        content: '<div style="background: ' + markerColor + '; color: white; padding: 8px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; min-width: 30px; text-align: center;">' + (isHome ? '🏠' : index) + '</div>'
      });
      map.add(marker);

      // 添加信息窗体
      var infoWindow = new AMap.InfoWindow({
        content: '<div style="padding: 15px; min-width: 200px;"><h4 style="margin: 0 0 10px 0; color: #667eea;">' + routeNames[index] + '</h4><p style="margin: 0; color: #666;">' + routeDates[index] + '</p></div>'
      });

      marker.on('click', function () {
        infoWindow.open(map, point);
      });
    });

    // 绘制路线
    var polyline = new AMap.Polyline({
      path: routePoints,
      strokeColor: '#667eea',
      strokeWeight: 4,
      strokeOpacity: 0.8,
      strokeStyle: 'solid',
      strokeDasharray: [10, 5]
    });
    map.add(polyline);

    // 调整视野以包含所有点
    map.setFitView();
  }

  // 地图图层控制
  var isDistanceLayerVisible = false;

  // 路段数据
  var routeSegments = [
    {from: '重庆翡翠华庭', to: '桐梓县', distance: '180km', time: '2.5h', day: 'Day1'},
    {from: '桐梓县', to: '金沙玉簪花云海', distance: '160km', time: '2h', day: 'Day1'},
    {from: '金沙玉簪花云海', to: '贵阳市', distance: '120km', time: '1.5h', day: 'Day2'},
    {from: '贵阳市', to: '毕节羊驼小镇', distance: '280km', time: '3.5h', day: 'Day4'},
    {from: '毕节羊驼小镇', to: '阿西里西大草原', distance: '80km', time: '1.5h', day: 'Day5'},
    {from: '阿西里西韭菜坪', to: '叙永县', distance: '220km', time: '3h', day: 'Day6'},
    {from: '叙永县', to: '重庆翡翠华庭', distance: '200km', time: '2.5h', day: 'Day7'}
  ];

  var legend;
  // 显示路线距离时间图层
  function showRouteDistance() {
    if(legend){
      legend.style.display = 'block';
      return false;
    }
    // 创建路线列表面板
    var panelContent = `
                <div style="
                    background: rgba(255,255,255,0.95);
                    border-radius: 8px;
                    padding: 12px;
                    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
                    max-height: 400px;
                    overflow-y: auto;
                    font-family: Arial, sans-serif;
                ">
                    <div style="
                        background: linear-gradient(135deg, #667eea, #764ba2);
                        color: white;
                        padding: 8px 12px;
                        border-radius: 6px;
                        margin-bottom: 10px;
                        text-align: center;
                        font-size: 14px;
                        font-weight: bold;
                    ">
                        🚗 行程总览 | 1240km • 16.5h
                    </div>
                    ${routeSegments.map((segment, index) => `
                        <div onclick="showRouteDetail(${index})" style="
                            display: flex;
                            justify-content: space-between;
                            align-items: center;
                            padding: 8px 10px;
                            margin-bottom: 6px;
                            background: white;
                            border-radius: 6px;
                            border-left: 3px solid #667eea;
                            cursor: pointer;
                            transition: all 0.3s ease;
                            font-size: 12px;
                        " onmouseover="this.style.background='#f8f9fa'; this.style.transform='translateX(3px)'" onmouseout="this.style.background='white'; this.style.transform='translateX(0)'">
                            <div style="flex: 1;">
                                <div style="font-weight: bold; color: #333; margin-bottom: 2px;">
                                    ${segment.day}
                                </div>
                                <div style="color: #666; font-size: 11px; line-height: 1.2;">
                                    ${segment.from} → ${segment.to}
                                </div>
                            </div>
                            <div style="text-align: right; font-weight: bold;">
                                <div style="color: #667eea;">${segment.distance}</div>
                                <div style="color: #FF5722; font-size: 11px;">${segment.time}</div>
                            </div>
                        </div>
                    `).join('')}
                </div>
            `;
    legend = document.createElement('div');
    legend.className = 'map-legend';
    legend.style.cssText = '';
    legend.innerHTML = panelContent;
    document.getElementById('mapContainer').appendChild(legend);
  }

  // 显示路段详情
  window.showRouteDetail = function (index) {
    var segment = routeSegments[index];

    // 创建详情弹窗
    var infoWindow = new AMap.InfoWindow({
      content: `
                    <div style="padding: 15px; min-width: 250px;">
                        <h4 style="margin: 0 0 12px 0; color: #667eea; font-size: 16px;">
                            🚗 ${segment.day} 行程详情
                        </h4>
                        <div style="margin-bottom: 8px;">
                            <strong>路线：</strong>${segment.from} → ${segment.to}
                        </div>
                        <div style="margin-bottom: 8px;">
                            <strong>距离：</strong><span style="color: #667eea; font-weight: bold;">${segment.distance}</span>
                        </div>
                        <div style="margin-bottom: 8px;">
                            <strong>预计时间：</strong><span style="color: #FF5722; font-weight: bold;">${segment.time}</span>
                        </div>
                        <div style="background: #f8f9fa; padding: 10px; border-radius: 6px; margin-top: 10px;">
                            <div style="font-size: 12px; color: #666; line-height: 1.4;">
                                💡 <strong>驾驶提醒：</strong><br>
                                • 每2小时休息一次<br>
                                • 山区路段减速慢行<br>
                                • 检查油量和轮胎
                            </div>
                        </div>
                    </div>
                `,
      offset: new AMap.Pixel(0, -10)
    });

    // 在地图中心显示信息窗口
    infoWindow.open(map, map.getCenter());
  }


  // 切换距离时间图层显示
  function toggleRouteDistance() {
    var btn = document.getElementById('distanceBtn');
    if (isDistanceLayerVisible) {
      // 隐藏图层
      legend.style.display = 'none';
      btn.textContent = '📏 显示距离时间';
      btn.style.background = 'linear-gradient(135deg, #ffeaa7, #fab1a0)';
      isDistanceLayerVisible = false;
    } else {
      // 显示图层
      showRouteDistance();
      btn.textContent = '🚫 隐藏距离时间';
      btn.style.background = 'linear-gradient(135deg, #FF6B6B, #EE5A52)';
      isDistanceLayerVisible = true;
    }
  }

  // 定位到家的位置
  function centerToHome() {
    if (map) {
      var homePosition = [106.51204, 29.644195]; // 重庆翡翠华庭
      map.setCenter(homePosition);
      map.setZoom(15);
      // 创建一个特殊的家的标记
      var homeMarker = new AMap.Marker({
        position: homePosition,
        content: '<div style="background: #ff6b6b; color: white; padding: 12px; border-radius: 50%; font-size: 16px; animation: pulse 2s infinite;">🏠</div>'
      });
      map.add(homeMarker);
      var homeInfo = new AMap.InfoWindow({
        content: '<div style="padding: 15px; text-align: center;"><h4 style="margin: 0 0 10px 0; color: #ff6b6b;">🏠 我们的家</h4><p style="margin: 0; color: #666;">重庆市渝北区金州大道107号<br>翡翠华庭二期</p></div>'
      });
      homeInfo.open(map, homePosition);
      setTimeout(function () {
        map.remove(homeMarker);
        homeInfo.close();
      }, 5000);
    }
  }

  // 城市对应的高德地图adcode
  var cityAdcodes = {
    '桐梓县': '520322',  // 桐梓县
    '贵阳市': '520100',  // 贵阳市
    '毕节市': '520500',  // 毕节市
    '韭菜坪': '520500',  // 毕节市（韭菜坪属于毕节）
    '叙永县': '510524'   // 叙永县
  };

  // 天气图标映射
  function getWeatherIcon(weather) {
    const iconMap = {
      '晴': '☀️',
      '多云': '⛅',
      '阴': '☁️',
      '阵雨': '🌦️',
      '雷阵雨': '⛈️',
      '雨': '🌧️',
      '中雨': '🌧️',
      '大雨': '🌧️',
      '暴雨': '⛈️',
      '雪': '❄️',
      '雾': '🌫️',
      '霾': '😷'
    };

    for (let key in iconMap) {
      if (weather.includes(key)) {
        return iconMap[key];
      }
    }
    return '�️'; // 默认图标
  }

  // 获取天气建议
  function getWeatherTips(weather, temperature) {
    const temp = parseInt(temperature);
    let tips = '';

    if (weather.includes('雨')) {
      tips = '备好雨具，注意道路湿滑';
    } else if (weather.includes('晴')) {
      tips = temp > 30 ? '天气炎热，注意防暑降温' : '天气晴好，适合户外活动';
    } else if (weather.includes('多云')) {
      tips = '天气适宜，适合游玩';
    } else if (weather.includes('阴')) {
      tips = '天气阴沉，注意保暖';
    } else {
      tips = '注意天气变化，适时增减衣物';
    }

    if (temp < 15) {
      tips += '，记得添衣保暖';
    } else if (temp > 35) {
      tips += '，高温天气请多补水';
    }

    return tips;
  }

  // 真实天气查询功能（使用高德地图API）
  function updateWeather(dayId, cityName) {
    // 显示加载状态
    var tempElement = document.getElementById(`temp-${dayId}`);
    var descElement = document.getElementById(`desc-${dayId}`);
    var refreshBtn = document.querySelector(`button[onclick*="updateWeather('${dayId}'"]`);

    if (tempElement) tempElement.textContent = '🔄 获取中...';
    if (descElement) descElement.textContent = '正在更新天气数据...';
    if (refreshBtn) {
      refreshBtn.textContent = '⏳ 更新中...';
      refreshBtn.disabled = true;
      refreshBtn.style.opacity = '0.6';
    }

    // 获取城市编码
    var adcode = cityAdcodes[cityName];
    if (!adcode) {
      console.error('未找到城市编码:', cityName);
      // 使用备用数据
      showFallbackWeather(dayId, cityName);

      // 恢复按钮状态
      if (refreshBtn) {
        refreshBtn.textContent = '🔄 刷新天气';
        refreshBtn.disabled = false;
        refreshBtn.style.opacity = '1';
      }
      return;
    }

    // 高德地图天气API（需要替换为您的API Key）
    var apiKey = '0e58f81e8dcb97f89822ba00e1a6c058'; // 请替换为实际的API Key
    var apiUrl = `https://restapi.amap.com/v3/weather/weatherInfo?key=${apiKey}&city=${adcode}&extensions=base`;

    // 使用JSONP方式调用API（避免跨域问题）
    var script = document.createElement('script');
    var callbackName = 'weatherCallback_' + dayId + '_' + Date.now();

    // 定义回调函数
    window[callbackName] = function (data) {
      try {
        if (data.status === '1' && data.lives && data.lives.length > 0) {
          var weather = data.lives[0];
          var temperature = weather.temperature + '°C';
          var weatherDesc = weather.weather;
          var icon = getWeatherIcon(weatherDesc);
          var tips = getWeatherTips(weatherDesc, weather.temperature);

          // 更新显示
          if (tempElement) {
            tempElement.innerHTML = `${icon} ${temperature}`;
          }
          if (descElement) {
            descElement.innerHTML = `${weatherDesc}<br><small style="opacity:0.8">${tips}</small>`;
          }

          // 成功更新提示
          var weatherWidget = document.getElementById(`weather-${dayId}`);
          if (weatherWidget) {
            weatherWidget.style.animation = 'pulse 0.5s ease-in-out';
            setTimeout(() => {
              weatherWidget.style.animation = '';
            }, 500);
          }

          // 恢复按钮状态
          if (refreshBtn) {
            refreshBtn.textContent = '🔄 刷新天气';
            refreshBtn.disabled = false;
            refreshBtn.style.opacity = '1';
          }
        } else {
          console.error('天气API返回错误:', data);
          showFallbackWeather(dayId, cityName);

          // 恢复按钮状态
          if (refreshBtn) {
            refreshBtn.textContent = '🔄 刷新天气';
            refreshBtn.disabled = false;
            refreshBtn.style.opacity = '1';
          }
        }
      } catch (error) {
        console.error('处理天气数据出错:', error);
        showFallbackWeather(dayId, cityName);

        // 恢复按钮状态
        if (refreshBtn) {
          refreshBtn.textContent = '🔄 刷新天气';
          refreshBtn.disabled = false;
          refreshBtn.style.opacity = '1';
        }
      }

      // 清理回调函数和script标签
      document.head.removeChild(script);
      delete window[callbackName];
    };

    // 添加callback参数并发起请求
    script.src = apiUrl + '&callback=' + callbackName;
    script.onerror = function () {
      console.error('天气API请求失败');
      showFallbackWeather(dayId, cityName);
      document.head.removeChild(script);
      delete window[callbackName];

      // 恢复按钮状态
      if (refreshBtn) {
        refreshBtn.textContent = '🔄 刷新天气';
        refreshBtn.disabled = false;
        refreshBtn.style.opacity = '1';
      }
    };

    document.head.appendChild(script);
  }

  // 备用天气数据（当API失败时使用）
  function showFallbackWeather(dayId, cityName) {
    var tempElement = document.getElementById(`temp-${dayId}`);
    var descElement = document.getElementById(`desc-${dayId}`);
    var refreshBtn = document.querySelector(`button[onclick*="updateWeather('${dayId}'"]`);

    // 备用天气数据
    const fallbackData = {
      '桐梓县': {temp: '26°C', desc: '多云转晴', icon: '⛅', tips: '适合户外活动，注意防晒'},
      '贵阳市': {temp: '28°C', desc: '阵雨转多云', icon: '🌦️', tips: '备好雨具，室内活动较佳'},
      '毕节市': {temp: '25°C', desc: '晴转多云', icon: '🌤️', tips: '天气宜人，适合游玩'},
      '阿西里西': {temp: '18°C', desc: '多云，山区较凉', icon: '☁️', tips: '记得带外套，温差较大'},
      '叙永县': {temp: '29°C', desc: '晴朗', icon: '☀️', tips: '天气晴好，注意防暑降温'}
    };

    const weather = fallbackData[cityName] || {
      temp: '25°C',
      desc: '天气良好',
      icon: '🌤️',
      tips: '适合出行'
    };

    if (tempElement) {
      tempElement.innerHTML = `${weather.icon} ${weather.temp}`;
    }
    if (descElement) {
      descElement.innerHTML = `${weather.desc}<br><small style="opacity:0.8;color:#ff6b6b">[备用数据] ${weather.tips}</small>`;
    }

    // 恢复按钮状态
    if (refreshBtn) {
      refreshBtn.textContent = '🔄 刷新天气';
      refreshBtn.disabled = false;
      refreshBtn.style.opacity = '1';
    }
  }

  // 页面加载完成后初始化地图
  document.addEventListener('DOMContentLoaded', function () {
    // 检查API Key配置
    var scriptTags = document.getElementsByTagName('script');
    var hasValidKey = false;
    for (var i = 0; i < scriptTags.length; i++) {
      var src = scriptTags[i].src;
      if (src && src.includes('webapi.amap.com') && !src.includes('您的高德地图key')) {
        hasValidKey = true;
        break;
      }
    }

    // 显示API配置提示
    if (!hasValidKey) {
      var apiTip = document.getElementById('apiTip');
      if (apiTip) {
        apiTip.style.display = 'block';
      }
    }
    // 检查高德地图API是否加载完成
    if (typeof AMap !== 'undefined') {
      initMap();
    } else {
      // 如果API未加载，显示提示信息
      document.getElementById('mapContainer').innerHTML =
              '<div class="loading">🗺️ 地图加载中，请稍候...<br><small>如地图无法加载，请检查网络连接或API Key配置</small></div>';
    }
    // 初始化所有天气数据
    updateWeather('day1', '桐梓县');
    updateWeather('day2', '贵阳市');
    updateWeather('day3', '贵阳市');
    setTimeout(() => {
      updateWeather('day4', '毕节市');
      updateWeather('day5', '毕节市');
    }, 1000);
    setTimeout(() => {
      updateWeather('day6', '叙永县');
      updateWeather('day7', '叙永县');
    }, 1000);
  });

  // 添加平滑滚动效果
  document.querySelectorAll('a[href^="#"]').forEach(anchor => {
    anchor.addEventListener('click', function (e) {
      e.preventDefault();
      document.querySelector(this.getAttribute('href')).scrollIntoView({
        behavior: 'smooth'
      });
    });
  });
</script>
</body>
</html>